<?php if ( is_admin() && $show_migration_message ) { ?>
    <div id="wplc_migration_notice" class='notice notice-success is-dismissible'
         style='margin-top: 30px;margin-bottom: 5px;'>
        <span style='font-size: large;text-decoration: underline'> Migration Successful </span><br/>
        You have successfully migrated from on-premise to hosted mode.<br/>
        <strong>Tip:</strong>Switch to "3CX mode" and get free video calls, SMS, Facebook integration as well as
        reporting.<br/>
        Just fill in the registration form and <a href="https://www.3cx.com/phone-system/download-phone-system/"
                                                  target="_blank">get 3CX for free for one year</a> for unlimited users!
    </div>
<?php } ?>
<div id="wplc_sound"></div>
<div id="wplc_admin_chat_holder">
    <div class="wplc_admin_chat_on_premise_header">
        <div id="wplc_admin_chat_info_new" class="wplc_admin_chat_on_premise_header_right">
            <img src=""
                 align="middle">
            <h2>3CX Live Chat</h2>
        </div>
    </div>

    <div class="bootstrap-wplc-content" id="wplc_agent_chat">
        <div class="container-fluid  h-100">
            <div class="row justify-content-center h-100">
                <div class="col-12">
                    <div id="wplc_connecting_loader" style="display: none">
                        <div class="d-flex flex-column align-items-center justify-content-center">
                            <div class="row">
                                <div class="spinner-border" role="status">
                                    <span class="sr-only"></span>
                                </div>
                            </div>
                            <div class="row">
                                <strong>Connecting to chat server...</strong>
                            </div>
                        </div>
                    </div>
                    <div style="display:none" id="wplc_chat_panel" class="h-100">
                        <div id="wplc_chat_list">
                            <div id="chat_list_head">
                                <div id="chat_list_head_row">
                                    <p class="chat_list_head_row_element"> <?= __( "Active Chats", "wp-live-chat-support" ); ?> </p>
                                </div>
                            </div>
                            <div id="chat_list_body">


                            </div>
                        </div>
                        <div id="inactive_chat_box">
                            <div id="wplc_chat_disable">
                                <img src="<?= wplc_protocol_agnostic_url( WPLC_PLUGIN_URL . '/images/svgs/offline_ic.svg' ); ?>">
                                <div id="inactive_message">
                                    <div id="wplc_no_chat"><?= __( "There are no active chats." ) ?></div>
                                    <div id="wplc_agent_offline"><?= __( "You have set your status to offline.", 'wp-live-chat-support' ) ?>
                                        <br/>
										<?= __( "To view visitors and accept chats please set your status to online using the switch on the top admin bar.", 'wp-live-chat-support' ) ?>
                                    </div>
                                    <div id="wplc_bh_offline"><?= __( 'The Live Chat box is currently disabled on your website due to:', 'wp-livechat' ) ?>
                                        <a href="<?= admin_url( 'admin.php?page=wplivechat-menu-settings#wplc-business-hours' ) ?>"><?= __( 'Chat Operating Hours Settings', 'wp-livechat' ) ?></a>
                                    </div>
                                </div>
                            </div>
                            <div id="wplc_chat_enable">

                            </div>
                        </div>
                        <div id="active_chat_box">
                            <div id="active_chat_box_wrapper">
                                <div id="chat_box_head">
                                    <div id="wplc_avatar_header">
                                        <img id="wplc_avatar_user" alt="user avatar"
                                             src="">
                                    </div>
                                    <div id="wplc_chat_header" class="recent_heading">
                                        <h4><span id="wplc_chat_name"></span></h4>
                                        <p style="margin:0px;"><span id="wplc_chat_email"></span></p>
                                    </div>

                                    <div class="end_chat_div">
                                        <a href="javascript:void(0);" class="wplc_admin_close_chat"
                                           id="wplc_admin_close_chat"><?= __( "End chat", 'wp-live-chat-support' ) ?> [
                                            <i
                                                    class="fa fa-times"
                                                    aria-hidden="true"></i> ]
                                        </a>

                                        <a href="javascript:void(0);" class="wplc_chat_info_menu"
                                           id="wplc_chat_info_menu">
                                            <i class="fas fa-bars"
                                               aria-hidden="true"></i>
                                        </a>
                                    </div>
                                </div>
                                <div id="chat_box_body">
                                    <div class="msg_history h-100" id="wplc_chat_messages">

                                    </div>
                                    <div id="wplc_guest_typing" style="display: none">typing....
                                    </div>

                                    <div class="type_msg no-gutters">
                                        <div style="display:none" id="wplc_join_chat">
                                            <a href="javascript:void(0);"
                                               class="button"
                                               id="wplc_admin_join_chat"><?= __( "Join chat", 'wp-live-chat-support' ) ?>
                                            </a>
                                        </div>
                                        <div style="display:none" id="wplc_chat_actions">
											<?php if ( count( $quick_responses ) > 0 ) { ?>
                                                <div class="dropup actions_msg">
                                                    <button type="button" class="wplc_chat_action_button"
                                                            id="quick_resp_btn"
                                                            data-toggle="dropdown" aria-haspopup="true"
                                                            aria-expanded="false">
                                                        <i class="fas fa-ellipsis-v" aria-hidden="true"></i>
                                                    </button>
                                                    <div class="dropdown-menu">
														<?php foreach ( $quick_responses as $key => $quick_response ) { ?>
                                                            <button class="dropdown-item" type="button"
                                                                    onclick="wplc_add_quick_response('<?= $quick_response->response ?>')"><?= $quick_response->title ?></button>
														<?php } ?>
                                                    </div>
                                                </div>
											<?php } ?>
											<?php if ( $wplc_settings->wplc_ux_file_share ) { ?>
                                                <input type="file" style="display:none"
                                                       id="file_input" name="file-picker"
                                                       accept="image/png, image/jpeg">
                                                <button id="file_picker" class="wplc_chat_action_button"
                                                        style="right:40px;"
                                                        type="button"><i
                                                            class="fas fa-paperclip"
                                                            aria-hidden="true"></i></button>
											<?php } ?>
                                            <div class="input_msg_write w-100">
                                                <input type="text" id="wplc_agent_chat_input" class="write_msg w-100"
                                                       placeholder="Type a message"/>
                                            </div>

                                            <button id="wplc_admin_send_msg" class="wplc_chat_action_button"
                                                    type="button">
                                                <img src="<?= wplc_protocol_agnostic_url( WPLC_PLUGIN_URL . '/images/svgs/send_ic.svg' ); ?>"> <?= __( "Send", "wp-live-chat-support" ) ?>
                                            </button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div id="wplc_sidebar">
                                <div id="wplc_sidebar_box_head">
                                    <div id="wplc_sidebar_box_head_row">
                                        <p class="wplc_sidebar_box_head_row_element"> <?= __( "Chat Information", "wp-live-chat-support" ) ?> </p>
                                    </div>

                                </div>
                                <div id="wplc_sidebar_box_body">
                                    <div id="chat_sidebar_wrapper">
                                        <p class="wplc_sidebar_title"><?= __( "Visitor Information", "wp-live-chat-support" ) ?></p>
                                        <hr/>
                                        <div id="wplc_chat_visitor_info">
                                            <div id='wplc_info_visitor_name' class="wplc_sidebar_info_row">
                                                <div id='wplc_info_visitor_name_label'
                                                     class="wplc_sidebar_element_label"><?=__("Name","wp-live-chat-support")?></div>
                                                <div id='wplc_info_visitor_name_value' class='wplc_sidebar_element_value'></div>
                                            </div>
                                            <div id="wplc_info_visitor_email" class="wplc_sidebar_info_row">
                                                <div id='wplc_info_visitor_email_label'
                                                     class="wplc_sidebar_element_label"><?=__("Email","wp-live-chat-support")?></div>
                                                <div id='wplc_info_visitor_email_value' class='wplc_sidebar_element_value'></div>
                                            </div>
                                        </div>
                                    </div>
                                    <div id="chat_sidebar_wrapper">
                                        <p class="wplc_sidebar_title"><?= __( "Custom Fields", "wp-live-chat-support" ) ?></p>
                                        <hr/>
                                        <div id="chat_custom_fields_info">

                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>